import { dictcodes } from '../../basicData/serviceOrg/config'

export const searchConfig = {
	inline: true,
	showBtn: true,
	labelPosition: 'left',
	column: [
		{
			label: '信用代码',
			prop: 'creditCode',
			type: 'input',
			span: 6,
		},
		{
			label: '机构名称',
			prop: 'organizationName',
			type: 'input',
			span: 6,
		},
		{
			label: '联系人',
			prop: 'burdenUserName',
			type: 'input',
			span: 6,
		},
		{
			label: '联系方式',
			prop: 'burdenUserPhone',
			type: 'input',
			span: 6,
		},
		// {
		// 	label: '所属地区',
		// 	prop: 'areas',
		// 	type: 'AplidAreaSelect',
		// 	span: 6,
		// },
		// {
		// 	label: '机构类型',
		// 	prop: 'organizationType',
		// 	type: 'remoteSelect',
		// 	code: 'ORG_TYPE',
		// 	api: 'getDictItemList',
		// 	filterKey: 'value',
		// 	multiple: false,
		// 	span: 6,
		// },
		{
			label: '机构星级',
			prop: 'organizationLevel',
			type: 'remoteSelect',
			code: 'ORG_LEVEL',
			api: 'getDictItemList',
			filterKey: 'label',
			multiple: false,
			span: 6,
		},
		// {
		// 	label: '运营状态',
		// 	prop: 'operateStatus',
		// 	changeField: true,
		// 	type: 'remoteSelect',
		// 	code: 'ORG_OPERATE_STATUS',
		// 	api: 'getDictItemList',
		// 	filterKey: 'value',
		// 	multiple: false,
		// 	span: 6,
		// },
	],
}

export const tableConfig = {
	stripe: true,
	border: true,
	columns: [
		{ label: '机构名称', prop: 'organizationName' },
		{ label: '联系人', prop: 'burdenUserName' },
		{ label: '联系方式', prop: 'burdenUserPhone' },
		{
			label: '机构评定星级',
			prop: 'organizationLevel',
		},
		{ label: '消息通知数量', prop: 'noticeNum' },
		{ label: '更新完成率', prop: 'noticeChangeCompleteRate' },
		{
			label: '操作',
			prop: 'menu',
			width: 300,
			fixed: 'right',
		},
	],
}

export const api = {
	index: 'view_dpSubsidyStatistics_page',
}
export const baseConfig = {
	pageName: '完整度',
	dictcodes,
	rowKey: 'id',
	addLabel: '新增',
	tipLabel: 'name',
	exportMqTopic: '/ning/export/',
	api,
	auth: {
		index: 'view_dpSubsidyStatistics_page',
	},
	menuBtn: [
		{
			icon: 'detail',
			label: '查看详情',
			type: 'primary',
			operate: 'detail',
			auth: '',
			text: true,
			show: true,
		},
	],
	dialogConfig: {
		width: '75%',
	},
	searchConfig,
	tableConfig,
}
